package com.roncoo.education.course.feign.biz;


import com.roncoo.education.common.core.tools.BeanUtil;
import com.roncoo.education.common.service.BaseBiz;
import com.roncoo.education.course.dao.ExperimentDao;
import com.roncoo.education.course.dao.impl.mapper.entity.Experiment;
import com.roncoo.education.course.feign.interfaces.vo.ExperimentViewVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 课程信息
 *
 * @author wujing
 */
@Component
@RequiredArgsConstructor
public class FeignExperimentBiz extends BaseBiz {

    @NotNull
    private final ExperimentDao dao;

    public ExperimentViewVO getById(Long id) {
        Experiment record = dao.getById(id);
        return BeanUtil.copyProperties(record, ExperimentViewVO.class);
    }
}
